home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1993 April
/
CICA MS Windows - April 1993.iso
/
unzipped
/
programr
/
segheap
/
segheap.doc
< prev
next >
Wrap
Text File
|
1992-02-17
|
2KB
|
51 lines
DOCUMENTATION ON THE SEGHEAP LIBRARY
====================================
by Stephen Chung (stephenc@cunixf.cc.columbia.edu)
Introduction
------------
These routines are to be used with Microsoft Windows 3.0. The library
implements a segmented heap in global memory space, allocating and freeing
memory blocks of different sizes at the user's request. It solves the
typical Windows problem of not being able to efficiently handle a large
number of small memory blocks allocated globally.
Caution
-------
These routines lock a memory handle immediately after allocation. As
a result, they work with PROTECTED MODE ONLY.
I think these routines are OK, but let me know if you find a bug.
How to use
----------
The routines SegHeapAlloc, SegHeapFree and SegHeapRealloc basically
parallel the malloc, free and realloc functions found in standard C
libraries. FreeAllMemory is designed to be used by the end of a program,
when all dynamic memory can be released. MemoryStatistics will
calculate some memory usage statistics.
Afterwords
----------
Theoretically, you are required to obtain special approval from me (because
I copyrighted these routines) if you want to use them in your programs.
However, I usually don't really care if you are not using these routines in
a commercial, shareware etc. product.
Any questions and/or bug fixes, please send email to:
Stephen Chung stephenc@cunixf.cc.columbia.edu
If it bounces, then try schung@cogsci.Berkeley.EDU
Have fun!